import { Component, OnInit, Input } from '@angular/core';
import { IPathInfo, IParameter } from '../../interfaces';
import { SwaggerTools } from '../../tools';

@Component({
  selector: 'swagger-info',
  templateUrl: './swagger-info.component.html',
  styles: []
})
export class SwaggerInfoComponent implements OnInit {

  @Input() data: IPathInfo | any;

  constructor(
  ) { }

  ngOnInit() {
  }

  hasRef(parameter: IParameter) {
    return SwaggerTools.hasRefByParameter(parameter);
  }

  getType(parameter: IParameter) {
    return SwaggerTools.getParameterType(parameter);
  }

}
